//
//  GroupView.m
//  cm
//
//  Created by suyibaishan on 2017/11/10.
//  Copyright © 2017年 feihu. All rights reserved.
//

#import "GroupView.h"

@implementation GroupView

-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self constructUI];
    }
    return self;
}

-(void)constructUI
{
    UIImageView *imgView = [[UIImageView alloc] init];
    imgView.image = [UIImage imageNamed:@"矢量智能对象1"];
    [self addSubview:imgView];
    imgView.sd_layout
    .topSpaceToView(self, 5)
    .leftSpaceToView(self, (kScreenWidth/4-52)/2)
    .widthIs(52)
    .heightIs(62);
    self.headerImageView = imgView;
    
    _nameLabel = [[UILabel alloc] init];
    _nameLabel.textAlignment = NSTextAlignmentCenter;
    _nameLabel.font = [UIFont systemFontOfSize:12];
    _nameLabel.textColor = [UIColor colorWithRed:0.43 green:0.43 blue:0.43 alpha:1];
    [self addSubview:_nameLabel];
    _nameLabel.sd_layout
    .topSpaceToView(imgView, 5)
    .leftSpaceToView(self, 0)
    .widthIs(kScreenWidth/4)
    .heightIs(20);
    
    _phoneLabel = [[UILabel alloc] init];
    _phoneLabel.textAlignment = NSTextAlignmentCenter;
    _phoneLabel.font = [UIFont systemFontOfSize:12];
    _phoneLabel.textColor = [UIColor blackColor];
    [self addSubview:_phoneLabel];
    _phoneLabel.sd_layout
    .topSpaceToView(_nameLabel, 0)
    .leftSpaceToView(self, 0)
    .widthIs(kScreenWidth/4)
    .heightIs(20);
    
    _referrerLabel = [[UILabel alloc] init];
    _referrerLabel.textAlignment = NSTextAlignmentCenter;
    _referrerLabel.font = [UIFont systemFontOfSize:12];
    _referrerLabel.textColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1];
    [self addSubview:_referrerLabel];
    _referrerLabel.sd_layout
    .topSpaceToView(_phoneLabel, 0)
    .leftSpaceToView(self, 0)
    .widthIs(kScreenWidth/4)
    .heightIs(20);
}


@end
